import request from '@/utils/request'

// 查询回款列表
export function listCollection(query) {
    return request({
        url: '/payment/list',
        method: 'get',
        params: query
    })
}

// 查询回款详细
export function getCollection(paymentId) {
    return request({
        url: '/payment/' + paymentId,
        method: 'get'
    })
}

// 新增回款
export function addCollection(data) {
    return request({
        url: '/payment',
        method: 'post',
        data: data
    })
}

// 修改回款
export function updateCollection(data) {
    return request({
        url: '/payment',
        method: 'put',
        data: data
    })
}

// 删除回款
export function delCollection(paymentId) {
    return request({
        url: '/payment/' + paymentId,
        method: 'delete'
    })
}
